home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libio / stdio / popen.c < prev    next >
C/C++ Source or Header  |  1993-11-26  |  438b  |  24 lines

  1. #include "libioP.h"
  2. #include "stdio.h"
  3. #include <errno.h>
  4.  
  5. FILE *
  6. popen(command, mode)
  7.      const char *command; const char *mode;
  8. {
  9.   return _IO_popen(command, mode);
  10. }
  11.  
  12. int
  13. pclose(fp)
  14.      FILE *fp;
  15. {
  16. #if 0
  17.   /* Does not actually test that stream was created by popen(). Instead,
  18.      it depends on the filebuf::sys_close() virtual to Do The Right Thing. */
  19.   if (fp is not a proc_file)
  20.     return -1;
  21. #endif
  22.   return _IO_fclose(fp);
  23. }
  24.